Skip to content

Conversation

@markosg04
Copy link
Collaborator

Introduces the witness gen machinery and types for the recursion-context dory snark

quangvdao and others added 6 commits September 24, 2025 15:17
Signed-off-by: Andrew Tretyakov <42178850+0xAndoroid@users.noreply.github.com>
Signed-off-by: Andrew Tretyakov <42178850+0xAndoroid@users.noreply.github.com>
Signed-off-by: Andrew Tretyakov <42178850+0xAndoroid@users.noreply.github.com>
@markosg04 markosg04 marked this pull request as ready for review September 30, 2025 16:41
@moodlezoup moodlezoup requested a review from Copilot October 1, 2025 17:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces witness generation machinery and types for SNARK composition in the context of the Dory protocol. The changes implement multilinear extension (MLE) operations, Fq12 polynomial conversions, and witness generation for exponentiation steps using square-and-multiply.

  • Adds comprehensive witness generation and verification for exponentiation operations with polynomial constraints
  • Implements Fq12 to polynomial coefficient mapping and multilinear extension evaluations
  • Includes extensive test coverage for MLE operations, constraint verification, and soundness testing

Reviewed Changes

Copilot reviewed 19 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
jolt-optimizations/src/witness_gen.rs Core witness generation logic for exponentiation steps with MLE constraint verification
jolt-optimizations/src/fq12_poly.rs Fq12 polynomial operations including tower basis mapping and multilinear extensions
jolt-optimizations/tests/witness_test.rs Comprehensive tests for witness generation, constraint verification, and soundness
jolt-optimizations/tests/mle_tests.rs Tests for multilinear extension evaluation and polynomial agreement
jolt-optimizations/src/lib.rs Module exports and public API additions
Multiple files Code formatting and import organization improvements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

);
}

println!("✓ Verified: H̃(z) = 0 at 20 random field elements (Sumcheck correct)");
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded message claims '20 random field elements' but the test loop runs 10000 iterations. This creates confusion and should be updated to match the actual test count.

Suggested change
println!("✓ Verified: H̃(z) = 0 at 20 random field elements (Sumcheck correct)");
println!("✓ Verified: H̃(z) = 0 at 10,000 random field elements (Sumcheck correct)");

Copilot uses AI. Check for mistakes.
use ark_ff::{BigInteger, Field, One, PrimeField, Zero};
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};

/// square-and-multiply witness generation
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The comment should use title case: 'Square-and-multiply witness generation' for consistency with documentation standards.

Suggested change
/// square-and-multiply witness generation
/// Square-and-Multiply Witness Generation

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@moodlezoup moodlezoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple of nits/questions

@moodlezoup moodlezoup merged commit 60a0d01 into dev/twist-shout Oct 3, 2025
1 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants